"""
应用配置文件
"""
import os
from dotenv import load_dotenv

# 加载环境变量
load_dotenv()

# API 配置
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY", "")
ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY", "")
OLLAMA_API_URL = os.getenv("OLLAMA_API_URL", "http://localhost:11434")

# 应用配置
APP_NAME = os.getenv("APP_NAME", "有感情的AI助手")
DEBUG = os.getenv("DEBUG", "False").lower() == "true"

# 模型配置
DEFAULT_OPENAI_MODEL = "gpt-3.5-turbo"
DEFAULT_CLAUDE_MODEL = "claude-3-sonnet-20240229"
DEFAULT_OLLAMA_MODEL = "llama2"

# UI 配置
PAGE_TITLE = "💭 有感情的AI助手"
PAGE_ICON = "💭"
LAYOUT = "wide"

# 情感配置
EMOTIONS = ["happy", "sad", "angry", "confused", "calm"]
DEFAULT_EMOTION_INTENSITY = 0.7
DEFAULT_TEMPERATURE = 0.8

# 性格选项
PERSONALITIES = {
    "温暖友善": "warm_friendly",
    "专业理性": "professional_rational",
    "幽默风趣": "humorous_witty",
    "同情共鸣": "empathetic_resonant",
    "充满活力": "energetic_vibrant"
}

# 提示词配置
MAX_TOKENS = 1000
CHAT_HISTORY_LIMIT = 20  # 保留最近20条消息

# 日志配置
LOG_LEVEL = "INFO"
LOG_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
